package cn.com.cis.persistence;

import java.util.List;

import cn.com.cis.domain.Role;

public interface RoleMapper {
  
  List<String> selectPermissionsForRole(int roleId);

  List<Role> selectRolesByUserId(int userId);
  
  Role selectRoleByRoleId(int roleId);

  Role selectRoleByName(String rolename);

  void addPermissionForRole(int roleId, String code);

  void deletePermissionFromRole(Integer roleId, String code);

  List<Role> selectRoles();

  void updateRole(Role role);

  void clearPermissions(int roleId);

  void deleteRoleById(int id);

  void insertRole(Role role);
}
